
def _getMatrix():
   matrix = []
   for i in range(3):
      row = [float(num) for num in input().strip().split(" ")]
      matrix.append(row)
   return matrix


def solve(matrix):

    n = len(matrix)
    det = 1
    for i in range(n):

        pivot_row = max(range(i, n), key=lambda r: abs(matrix[r][i]))

        if matrix[pivot_row][i] == 0:
            return 0

        if pivot_row != i:
            matrix[i], matrix[pivot_row] = matrix[pivot_row], matrix[i]
            det *= -1
        for j in range(i + 1, n):
            if matrix[j][i] != 0:
                factor = matrix[j][i] / matrix[i][i]
                for k in range(i, n):
                    matrix[j][k] -= factor * matrix[i][k]
    for i in range(n):
        det *= matrix[i][i]

    return det


matrix = _getMatrix()
print("%.4f"%solve(matrix))